using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_UrgeToBXMap : EntityTypeConfiguration<FMS_UrgeToBX>
	{
		public FMS_UrgeToBXMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.Description)
				.IsRequired()
				.HasMaxLength(100);
				
			// Table & Column Mappings
			this.ToTable("FMS_UrgeToBX");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.UID).HasColumnName("UID");
			this.Property(t => t.BorrowID).HasColumnName("BorrowID");
			this.Property(t => t.Description).HasColumnName("Description");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.UpdateUser).HasColumnName("UpdateUser");
			this.Property(t => t.IsSendEmail).HasColumnName("IsSendEmail");
			this.Property(t => t.IsSendMessage).HasColumnName("IsSendMessage");
			this.Property(t => t.Type).HasColumnName("Type");
		}
	}
}

